<?php
include_once ("../Login/databaseconnection.php");
$Resource_Id=$_POST['Resource_Id'];
$Resource_Type=$_POST['Resource_Type'];
date_default_timezone_set("Europe/Paris");
    $t_d=date("Y/m/d");
 if($Resource_Id!=""&&$Resource_Type!="")
	{
$sql=mysql_query("INSERT INTO resource(Resource_Id,Resource_Type,Last_Updated_Date)values('$Resource_Id','$Resource_Type','$t_d')");
if(mysql_affected_rows()==1)
  {
$_SESSION['error']="This record is successfully registered!";
$_SESSION['OK']="OK";
$_SESSION['Resource_Id']=$Resource_Id;
  }

  if(mysql_affected_rows()==0)
  {
$_SESSION['error']="Sorry unable to register this record!";
  }
  }
  if($Resource_Id==""||$Resource_Type=="")
	{
	$_SESSION['errorin']="Please fill all!";
  }
?>

